package com.ruoyi.ora.constant;

import com.ruoyi.common.enums.dict.AiPlatform;
import com.ruoyi.ora.netty.channel.domain.CallEntity;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 业务常量
 */
public class BizConstants {

    /** 系统全局开关 */
    public static boolean SYS_GLOBAL_SWITCH = true;

    public static AiPlatform AI_MODEL = AiPlatform.HUNYUAN;
    public static AiPlatform TRAN_MODEL = AiPlatform.XFYUN;


    /** 字典相关 */
    public class Dict{
        /** 系统开关 */
        public static final String SYS_NORMAL_DISABLE = "sys_normal_disable";
        /** 系统状态 */
        public static final String SYS_COMMON_STATUS = "sys_common_status";
        /** 系统是否 */
        public static final String SYS_YES_NO = "sys_yes_no";
    }

    /** redis相关 */
    public class Redis{

        public class SysConfig{
            /** 传入用户类型  */
            public static final String REGISTER_USER_DEFAULT_ROLE_ID_KEY = "register_user_default_role_id_%s";

            /** 注册用户默认代码商 */
            public static final String REGISTER_USER_DEFAULT_AGENT_ID_KEY = "register_user_default_agent_id";

            /** mygptlife api url */
            public static final String MYGPTLIFE_API_URL = "mygptlife_api_url";
            /** mygptlife api key */
            public static final String MYGPTLIFE_API_KEY = "mygptlife_api_key";


            /** hunyuan api url */
            public static final String HUNYUAN_API_URL = "hunyuan_api_url";
            /** hunyuan api key */
            public static final String HUNYUAN_API_KEY = "hunyuan_api_key";
        }
    }

    public static class Channel {

//        /**
//         * 设备通道集合 key 设备id  value 通道id asLongText
//         */
//        public static Map<String, io.netty.channel.Channel> CHANNEL_DEVICE_MAP = new ConcurrentHashMap<>();
//
//        /**
//         * APP通道集合 key 用户id  value 通道id asLongText
//         */
//        public static Map<String, io.netty.channel.Channel> CHANNEL_APP_MAP = new ConcurrentHashMap<>();

        /**
         * key 通道id asLongText  value channel对象
         */
        public static Map<String, io.netty.channel.Channel> CHANNEL_MAP = new ConcurrentHashMap<>();

        /**
         * key userId  value 通道id asLongText
         */
        public static Map<String, String> CHANNEL_USERID_MAP = new ConcurrentHashMap<>();

        /**
         * 通话集合 key 通话id  value 通道id集合 asLongText
         */
        public static Map<Integer, List<CallEntity>> CALL_MAP = new ConcurrentHashMap<>();

        /**
         * 通道对应通话对象 key 通道id asLongText  value CallEntity对象
         */
        public static Map<String, CallEntity> CHANNEL_CALL_MAP = new ConcurrentHashMap<>();

    }


}
